home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
misc
/
egs.lha
/
EGS
/
EGS_Devels
/
doc
/
egsgadbox.doc
< prev
next >
Wrap
Text File
|
1993-02-16
|
47KB
|
2,158 lines
/*
* $
* $ FILE : egsgadbox.doc
* $ VERSION : 1
* $ REVISION : 1
* $ DATE : 08-Feb-93 09:53
* $
* $ Author : mvk
* $
*
*
* (c) Copyright 1990/93 VIONA Development
* All Rights Reserved
*
*/
egsgadbox.library/EB_AddFirstSon
egsgadbox.library/EB_AddLastSon
egsgadbox.library/EB_AllocMemCon
egsgadbox.library/EB_CalcGadgetGfx
egsgadbox.library/EB_CalcMinMax
egsgadbox.library/EB_CalcPositions
egsgadbox.library/EB_CalcRealSize
egsgadbox.library/EB_ConnectGadgets
egsgadbox.library/EB_CreateActionGadget
egsgadbox.library/EB_CreateArrow
egsgadbox.library/EB_CreateArrowGfx
egsgadbox.library/EB_CreateBackBorder
egsgadbox.library/EB_CreateBoolGadget
egsgadbox.library/EB_CreateBorder
egsgadbox.library/EB_CreateBox
egsgadbox.library/EB_CreateBoxedMultiText
egsgadbox.library/EB_CreateButton24
egsgadbox.library/EB_CreateButtonGadget
egsgadbox.library/EB_CreateCenterText
egsgadbox.library/EB_CreateCheckMarkGadget
egsgadbox.library/EB_CreateDoubleBorder
egsgadbox.library/EB_CreateFillBox
egsgadbox.library/EB_CreateFrontBorder
egsgadbox.library/EB_CreateGadContext
egsgadbox.library/EB_CreateGroupBorder
egsgadbox.library/EB_CreateHorizBox
egsgadbox.library/EB_CreateHorizFill
egsgadbox.library/EB_CreateHorizProp
egsgadbox.library/EB_CreateHorizTable
egsgadbox.library/EB_CreateInfoBox
egsgadbox.library/EB_CreateIntegerGadget
egsgadbox.library/EB_CreateLateBox
egsgadbox.library/EB_CreateMaster
egsgadbox.library/EB_CreateMasterWindow
egsgadbox.library/EB_CreateMultiAction
egsgadbox.library/EB_CreateMultiAction2
egsgadbox.library/EB_CreateMultiActionV
egsgadbox.library/EB_CreateMultiText
egsgadbox.library/EB_CreateNameIntegerGadget
egsgadbox.library/EB_CreateNameRealGadget
egsgadbox.library/EB_CreateNameStringGadget
egsgadbox.library/EB_CreateRealGadget
egsgadbox.library/EB_CreateResponseBox
egsgadbox.library/EB_CreateStringGadget
egsgadbox.library/EB_CreateSuperHorizProp
egsgadbox.library/EB_CreateSuperVertiProp
egsgadbox.library/EB_CreateText
egsgadbox.library/EB_CreateTextAction
egsgadbox.library/EB_CreateTextBoolean
egsgadbox.library/EB_CreateVertiBox
egsgadbox.library/EB_CreateVertiFill
egsgadbox.library/EB_CreateVertiProp
egsgadbox.library/EB_CreateVertiTable
egsgadbox.library/EB_CreateWindow
egsgadbox.library/EB_CWidth
egsgadbox.library/EB_DeleteGadContext
egsgadbox.library/EB_FindGadget
egsgadbox.library/EB_FreeMemCon
egsgadbox.library/EB_GetStringData
egsgadbox.library/EB_LinkStringGadgets
egsgadbox.library/EB_LinkStringGadgetsID
egsgadbox.library/EB_MAX
egsgadbox.library/EB_MIN
egsgadbox.library/EB_NewFixHeight
egsgadbox.library/EB_NewFixWidth
egsgadbox.library/EB_NewMaxHeight
egsgadbox.library/EB_NewMaxWidth
egsgadbox.library/EB_NewMinHeight
egsgadbox.library/EB_NewMinWidth
egsgadbox.library/EB_NewSameSize
egsgadbox.library/EB_NewPri
egsgadbox.library/EB_ProcessGadBoxes
egsgadbox.library/EB_ProcessGadBoxesSize
egsgadbox.library/EB_PutIntData
egsgadbox.library/EB_PutRealData
egsgadbox.library/EB_PutStringData
egsgadbox.library/EB_SMatch
egsgadbox.library/EB_SWidth
egsgadbox.library/EB_WriteInfoBox
egsgadbox.library/EB_WriteInfoBoxInt
egsgadbox.library/EB_AddFirstSon
NAME
EB_AddFirstSon Add son to gadbox
SYNOPSIS
EB_AddFirstSon(father, son)
A0 A1
EB_GadBoxPtr father, son;
FUNCTION
Add an gadbox as first son to an other gadbox.
INPUTS
RETURNS
egsgadbox.library/EB_AddLastSon
NAME
EB_AddLastSon Add son to gadbox
SYNOPSIS
EB_AddLastSon(father, son)
A0 A1
EB_GadBoxPtr father, son;
FUNCTION
Add an gadbox as last son to an other gadbox.
INPUTS
RETURNS
egsgadbox.library/EB_AllocMemCon
NAME
EB_AllocMemCon Allocate memory to context
SYNOPSIS
mem = EB_AllocMemCon(con, size)
D0 A0 D0
APTR mem;
EB_ContextPtr con;
LONG size;
FUNCTION
Allocate memory which is tracked using a context. The memory must be freed
using EB_FreeMemCon or using EB_DeleteGadContext.
INPUTS
con : pointer to context
size : size in bytes
RETURNS
pointer to memory or NULL if failed
egsgadbox.library/EB_CalcGadgetGfx
NAME
EB_CalcGadgetGfx calculate gadgets graphics
SYNOPSIS
done = EB_CalcGadgetGfx(con, box)
D0 A0 A1
BOOL done;
EB_GadContext con;
EB_GadBoxPtr box;
FUNCTION
Calculates and creates the rendering commands for the gadgets (see also
EB_ProcessGadBoxes). Normaly you need not call this function, as it is part
of EB_ProcessGadBoxes.
INPUTS
con : pointer to gadget context
box : pointer to root of gadbox tree
RETURNS
FALSE if fails, see con->error field for more information
egsgadbox.library/EB_CalcMinMax
NAME
EB_CalcMinMax calculates gadgets min and max
SYNOPSIS
done = EB_CalcMinMax(box)
D0 A0
BOOL done;
EB_GadBoxPtr box;
FUNCTION
Calculates the real minimum and maximum values of a gadbox tree, according
to their given min and max values. Normaly you need not call this function,
as it is part of EB_ProcessGadBoxes.
INPUTS
box : pointer to root of gadbox tree
RETURNS
FALSE if fails, see con->error field for more informations
egsgadbox.library/EB_CalcPositions
NAME
EB_CalcPositions calculate gadgets position
SYNOPSIS
done = EB_CalcPositions(box, x, y)
D0 A0 D0 D1
BOOL done;
EB_GadBoxPtr box;
WORD x, y;
FUNCTION
Calculates the real positions of gadgets and rendering of a gadbox tree,
according to their minimal sizes. Normaly you need not call this function,
as it is part of EB_ProcessGadBoxes.
INPUTS
box : pointer to root of gadbox tree
x, y : upper left relative coordinates
RETURNS
FALSE if fails, see con->error field for more informations
egsgadbox.library/EB_CalcRealSize
NAME
EB_CalcRealSize calculate gadgets sizes
SYNOPSIS
done = EB_CalcRealSize(box)
D0 A0
BOOL done;
EB_GadBoxPtr box;
FUNCTION
Calculates the real size of every member in a gadbox tree, according to
their minimal and maximal values. Normaly you need not call this function,
as it is part of EB_ProcessGadBoxes.
INPUTS
box : pointer to root of gadbox tree
RETURNS
FALSE if fails, see con->error field for more informations
egsgadbox.library/EB_ConnectGadgets
NAME
EB_ConnectGadgets connect gadgets of gadbox tree
SYNOPSIS
EB_ConnectGadgets(box, first, num)
A0 A1 A2
EB_GadBoxPtr box;
EI_GadgetPtr *first;
WORD *num;
FUNCTION
Connects the gadgets of a gadbox tree to a gadget list (or tree if master
gadgets are used). Normaly you need not call this function, as it is part
of EB_ProcessGadBoxes.
INPUTS
box : pointer to root of gadbox tree
first : pointer to EI_GadgetPtr, in which to store the first gadget
num : pointer to WORD, in which to store the number of primary gadgets
RETURNS
egsgadbox.library/EB_CreateActionGadget
NAME
EB_CreateActionGadget create an action gadget
SYNOPSIS
box = EB_CreateActionGadget(con, with, id)
D0 A0 A1 D0
EB_GadContext con;
EB_GadBoxPtr box, with;
LONG id;
FUNCTION
Creates an action gadget around a gadbox subtree using the id. The subtree
may only contain rendering information, which is used for the gadgets
active field. The gadget has flag EI_stdHighlight set, so you need no
extra border around the gadget.
INPUTS
con : pointer to gadcontext
with : subtree, describing the gadgets graphic
id : gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateArrow
NAME
EB_CreateArrow create an arrow gadget
SYNOPSIS
box = EB_CreateArrow(con, dest, id)
D0 A0 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
WORD dest;
LONG id;
FUNCTION
Creates an arrow gadget, pointing in direction dest (see EI_arrow..).
INPUTS
con : pointer to gadcontext
dest : pointers destination
id : gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateArrowGfx
NAME
EB_CreateArrowGfx creates an arrow
SYNOPSIS
box = EB_CreateArrowGfx(con, dest)
D0 A0 D0
EB_GadBoxPtr box;
EB_GadContext con;
WORD dest;
FUNCTION
Creates the graphics for an arrow, pointing in direction dest
(see EI_arrow..).
INPUTS
con : pointer to gadcontext
dest : pointers destination
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateBackBorder
NAME
EB_CreateBackBorder creates a back border
SYNOPSIS
box = EB_CreateBackBorder(con, around, fill)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
UBYTE fill;
FUNCTION
Creates a border which seems to go into the screen around an existing
gadbox subtree. This function also creates a little space between the
inner graphics and the border.
INPUTS
con : pointer to gadcontext
around : subtree, around which to build the border
fill : flags, which determine, if the borderspace is allowed to expand
if needed
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateBoolGadget
NAME
EB_CreateBoolGadget create boolean gadget
SYNOPSIS
box = EB_CreateBoolGadget(con, with, id)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr with;
LONG id;
FUNCTION
Creates an boolean gadget around a gadbox subtree using the id. The subtree
may only contain rendering information, which is used for the gadgets
active field. The gadget has flag EI_stdHighlight set, so you need no
extra border around the gadget.
INPUTS
con : pointer to gadcontext
with : subtree, describing the gadgets graphic
id : gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateBorder
NAME
EB_CreateBorder create space around graphics
SYNOPSIS
box = EB_CreateBorder(con, around, fill)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr around;
UBYTE fill;
FUNCTION
Creates a little space around a subtree on each side.
INPUTS
con : pointer to gadcontext
around : subtree, around which to build the border
fill : flags, which determine, if the borderspace is allowed to expand
if needed
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateBox
NAME
EB_CreateBox create gadbox
SYNOPSIS
box = EB_CreateBox(con, orient, minWidth, maxWidth, minHeight, maxHeight)
D0 A0 D0 D1 D2 D3 D4
EB_GadBoxPtr box;
EB_GadContext con;
UBYTE orient;
WORD minWidth, maxWidth, minHeight, maxHeight;
FUNCTION
Creates a simple gadbox.
INPUTS
con : pointer to gadcontext
orient : orientation of the gadbox:
EB_horizontal : the box may have several sons, which are
ordered horizontal
EB_vertical : the box may have several sons, which are
ordered vertical
EB_unknown : the box may have only one son
EB_horizTable : the box may have several sons, whih may
either be unknown, or vertical. All vertical
sons must have the same number of sons,
because the grandsons are ordered in a table.
EB_vertiTable : the box may have several sons, whih may
either be unknown, or horizontal. All
horizontal sons must have the same number of
sons, because the grandsons are ordered in a
table.
EB_select : the box may have several sons, which all lay
at the same location.
minWidth,
minHeight : minimal size of the box, EB_min for any
maxWidth,
maxHeight : maximal size of the box, EB_max for any
RETURNS
NULL if fails, else pointer to new gadbox
egsgadbox.library/EB_CreateBoxedMultiText
NAME
EB_CreateBoxedMultiText create text in box
SYNOPSIS
box = EB_CreateBoxedMultiText(con, text)
D0 A0 A1
EB_GadBoxPtr box;
EB_GadContext con;
EB_StrArrayPtr text;
FUNCTION
Creates several lines of text in a back bordered box.
INPUTS
con : pointer to gadcontext
text : Array of pointers to strings, which build the lines. The last entry
must contain NULL, for termination.
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateButton24
NAME
EB_CreateButton24 creates 24 bit button
SYNOPSIS
box = EB_CreateButton24(con, around, color, back, fill)
D0 A0 A1 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr around;
ULONG color, back;
UBYTE fill;
FUNCTION
Creates the graphics for a special three dimensional button, which may be
used for bool or action gadgets.
INPUTS
con : pointer to gad context
around : the buttons text or image
color : the buttons color
back : the color of the background, surrounding the button
fill : flags, defining where to fill around the image
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateButtonGadget
NAME
EB_CreateButtonGadget creates a round radio button
SYNOPSIS
box = EB_CreateButtonGadget(con, id)
D0 A0 D0
EB_GadBoxPtr box;
EB_GadContext con;
LONG id;
FUNCTION
Creates the gadget and graphics for a radio gadget, that is a round
3d style gadget with a center that is filled on activation.
Normally these are used in the radio buttons (gbradio.library).
INPUTS
con : pointer to gad context
id : id of the gadget
RETURNS
box : the resulting box or NULL if fails
egsgadbox.library/EB_CreateCenterText
NAME
EB_CreateCenterText create centered text
SYNOPSIS
box = EB_CreateCenterText(con, str)
D0 A0 A1
EB_GadBoxPtr box;
EB_GadContext con;
char *str;
FUNCTION
Creates a text that is centered using surrounding boxes.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateCheckMarkGadget
NAME
EB_CreateCheckMarkGadget make a checkmark gadget
SYNOPSIS
box = EB_CreateCheckMarkGadget(con, id)
D0 A0 D0
EB_GadBoxPtr box;
EB_GadContext con;
LONG id;
FUNCTION
Creates an boolean gadget with a graphic that looks like a check-mark.
This gadget starts in the off state and comes complete with border
and everything.
INPUTS
con : pointer to gadcontext
with : subtree, describing the gadgets graphic
id : gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateDoubleBorder
NAME
EB_CreateDoubleBorder create double border
SYNOPSIS
box = EB_CreateDoubleBorder(con, around, fill)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr around;
UBYTE fill;
FUNCTION
Creates a double border, normaly used for string/integer gadgets.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateFillBox
NAME
EB_CreateFillBox create fill box
SYNOPSIS
box = EB_CreateFillBox(con)
D0 A0
EB_GadBoxPtr box;
EB_GadContext con;
FUNCTION
Creates a box, that can fill unused areas. It can be used for spacing around
fixed sized images when changing font size.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateFrontBorder
NAME
EB_CreateFrontBorder creates a front border
SYNOPSIS
box = EB_CreateFrontBorder(con, around, fill)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr around;
UBYTE fill;
FUNCTION
Creates a border which seems to come out of the screen around an existing
gadbox subtree. This function also creates a little space between the
inner graphics and the border.
INPUTS
con : pointer to gadcontext
around : subtree, around which to build the border
fill : flags, that determine, if the borderspace is allowed to expand
if needed
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateGadContext
NAME
EB_CreateGadContext create gadget context
SYNOPSIS
con = EB_CreateGadContext(font, tfont, color, back)
D0 A0 A1 D0 D1
EB_GadContext con;
EG_EFontPtr font, tfont;
ULONG color, back;
FUNCTION
Creates a gadget context. This structure keeps track of all structures that
are allocated to create a gadbox tree, and all gadgets and substructures.
This structure also contains information obout the fonts and colors of
the gadgets. The structure has to be deleted using EB_DeleteGadContext, after
the requester/window has been closed. This will also delete all associated
structures and gadgets.
INPUTS
font : normal font, if NULL the system window font is used
tfont : text gadget font, if NULL the system default font is used
color,
back : colors for 24 bit gadgets, -1 if normal gadgets are to be used
RETURNS
NULL if fails, else pointer to new gadget context
egsgadbox.library/EB_CreateGroupBorder
NAME
EB_CreateGroupBorder creates a nice looking border with text around a box
SYNOPSIS
box = EB_CreateGroupBorder(con,around,fill,name);
D0 A0 A1 D0 A2
EB_GadBoxPtr box;
EB_GadContext con;
EB_GadBoxPtr around;
LONG fill;
char *name;
FUNCTION
This function will create a 3D border around a box. The top line
will be broken in the middle and in that break, the name is
displayed, like this: +---- Name ----+
| |
| Box Contents |
| |
+--------------+
INPUTS
con : pointer to gadcontext
around : pointer to the interior
fill : where you want fill space
name : null-terminated string
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateHorizBox
NAME
EB_CreateHorizBox creates horizontal box
SYNOPSIS
box = EB_CreateHorizBox(con)
D0 A0
EB_GadBoxPtr box;
EB_GadContext con;
FUNCTION
Creates a box that combines several other boxes horizontal. All son boxes
of a horizontal box are places one besides the other, and build a row.
INPUTS
con : pointer to gadcontext
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateHorizFill
NAME
EB_CreateHorizFill create horizontal pad
SYNOPSIS
box = EB_CreateHorizFill(con, fill, pri)
D0 A0 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
BOOL fill;
BYTE pri;
FUNCTION
Creates a fill element for horizontal boxes. This should be used, to separate
gadgets or gadget groups, or to create paddings betweeen borders.
INPUTS
con : pointer to gadcontext
fill : flag, that determines, if the fill box is allowed to expand if needed
pri : the boxes priority
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateHorizProp
NAME
EB_CreateHorizProp create horizontal propgadget
SYNOPSIS
box = EB_CreateHorizProp(con, maximum, size, val, id)
D0 A0 D0 D1 D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
WORD maximum, size, val;
LONG id;
FUNCTION
Creates a horizontal proportional gadget, and all needed graphics.
INPUTS
con : pointer to gadcontext
maximum : maximum value of slider
size : size of slider
val : value of slider
id : the gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateHorizTable
NAME
EB_CreateHorizTable create horizontal table
SYNOPSIS
box = EB_CreateHorizTable(con)
D0 A0
EB_GadBoxPtr box;
EB_GadContext con;
FUNCTION
Creates a horizontal table, that may contain several vertical boxes, and
arranges their elements in a table.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateInfoBox
NAME
EB_CreateInfoBox creates information box
SYNOPSIS
box = EB_CreateInfoBox(con, info, font, minWidth, maxWidth, justify)
D0 A0 A1 A2 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
EB_InfoBoxPtr info;
EG_EFontPtr font;
WORD minWidth, maxWidth;
UBYTE justify;
FUNCTION
Creates an information box. This type of box is used, to display text in
an allready rendered window/gadget. The function modifies a given structure
by setting real coordinates and real dimensions after calculating.
INPUTS
con : pointer to gadcontext
info : pointer to info box, that is modified
font : font, in which to display the text
minWidth,
maxWidth : minimum and maximum dimensions in characters
justify : justification of displayed text
RETURNS
NULL if fails, else pointer to new gadbox
egsgadbox.library/EB_CreateIntegerGadget
NAME
EB_CreateIntegerGadget creates an integer gadget
SYNOPSIS
box = EB_CreateIntegerGadget(con, minChar, digits, id)
D0 A0 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
WORD minChar, digits;
LONG id;
FUNCTION
Creates an integer gadget and associated graphics.
INPUTS
con : pointer to gad context
minChar : minimum number of chars to display
digits : number of digits in integer number
id : the gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateLateBox
NAME
EB_CreateLateBox create late calculation box
SYNOPSIS
box = EB_CreateLateBox(con, create, minWidth, maxWidth, minHeight, maxHeight)
D0 A0 A1 D0 D1 D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
EB_GBCreate create;
WORD minWidth, maxWidth, minHeight, maxHeight;
FUNCTION
Creates a late construction box. The interiour of this type of box is
created during calculation, by a call to EB_GBCreate. This function is called
with a pointer to the box in A0. At this time the real size of the box is
allready calculated and resides in box->minWidth and box->maxWidth.
INPUTS
con : pointer to gad context
create : constructor procedure.
minWidth,
minHeight : minimal dimensions
maxWidth,
maxHeight : maximum dimensions
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateMaster
NAME
EB_CreateMaster create a master gadget
SYNOPSIS
box = EB_CreateMaster(con, type, id)
D0 A0 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
LONG type;
LONG id;
FUNCTION
Creates a master gadget. A master gadget is a gadget, that contains several
other gadgets. E.g. a prop gadget with arrows is a master gadget, containing
to action gadgets an a normal prop gadget.
INPUTS
con : pointer to gadget context
type : custom type id
id : gadget id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateMasterWindow
NAME
EB_CreateMasterWindow creates a master window
SYNOPSIS
box = EB_CreateMasterWindow(con, win, with)
D0 A0 A1 A2
EB_GadBoxPtr box;
EB_GadContext con;
EI_WindowPtr win;
EB_GadBoxPtr with;
FUNCTION
Creates a window (or uses an exisiting one) that contains only one gadget,
a master gadget, that includes all rendering and subgadgets, so it can
easily be removed, resized, and added again.
INPUTS
RETURNS
NULL if fails, else pointer to new tree
egsgadbox.library/EB_CreateMultiAction
NAME
EB_CreateMultiAction creates several action gadgets
SYNOPSIS
box = EB_CreateMultiAction(con, names, ids, fill)
D0 A0 A1 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
EB_StrArrayPtr names;
LONG ids;
UBYTE fill;
FUNCTION
Creates several action gadgets in a row. The names of the gadgets must be
supplied in an array of pointers to string. The last element in the array
must be a NULL for termination.
INPUTS
con : pointer to gadget context
names : pointer to array of pointers to string.
ids : first gadgets id, following gadgets have successing numbers
fill : flags, if filling is allowed
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateMultiAction2
NAME
EB_CreateMultiAction2 creates a table of action gadgets
SYNOPSIS
box = EB_CreateMultiAction2(con, names, ids)
D0 A0 A1 D0
EB_GadBoxPtr box;
EB_GadContext con;
EB_StrArrayPtr2 names;
LONG id;
FUNCTION
Creates a table of action gadgets. The names of the gadgets must be
provided in an array of pointers to arrays of pointers to strings.
The last elements in the arrays must be NULL for termination.
INPUTS
con : pointer to gadget context
names : pointer to array of pointers to arrays of pointers to strings
ids : The number of the top left gadgets. Gadget ids from left to
right increase by one, from top to bottom by 0x100.
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateMultiActionV
NAME
EB_CreateMultiActionV creates several action gadgets
SYNOPSIS
box = EB_CreateMultiActionV(con, names, ids, fill)
D0 A0 A1 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
char *names;
LONG ids;
UBYTE fill;
FUNCTION
Creates several action gadgets in a collumn. The names of the gadgets must be
provided in an array of pointers to string. The last element in the array
must be a NULL for termination.
INPUTS
con : pointer to gadget context
names : pointer to array of pointers to string.
ids : first gadgets id, following gadgets have successing numbers
fill : flags, if filling is allowed
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateMultiText
NAME
EB_CreateMultiText
SYNOPSIS
box = EB_CreateMultiText(con, text)
D0 A0 A1
EB_GadBoxPtr box;
EB_GadContext con;
EB_StrArrayPtr text;
FUNCTION
Creates several lines of text;
INPUTS
con : pointer to gadcontext
text : Array of pointers to strings, which build the lines. The last entry
must contain NULL, for termination.
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateNameIntegerGadget
NAME
EB_CreateNameIntegerGadget create integer gadget with name
SYNOPSIS
box = EB_CreateNameIntegerGadget(con, name, minChar, digits, id)
D0 A0 A1 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
char *name;
WORD minChar, digits;
LONG id;
FUNCTION
Creates an integer gadget with a name on its left side (see
EB_CreateIntegerGadget for more information)
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateNameRealGadget
NAME
EB_CreateNameRealGadget create a real gadget with a name
SYNOPSIS
box = EB_CreateNameRealGadget(con, name, minChar, digits, id)
D0 A0 A1 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
char *name;
WORD minChar, digits;
LONG id;
FUNCTION
Creates an longreal gadget with a name on its left side (see
EB_CreateRealGadget for more information)
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateNameStringGadget
NAME
EB_CreateNameStringGadget creates a string gadget with name
SYNOPSIS
box = EB_CreateNameStringGadget(con, name, minChar, buffLen, justify, id)
D0 A0 A1 D0 D1 D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
char *name;
WORD minChar, buffLen;
UBYTE justify;
LONG id;
FUNCTION
Creates an string gadget with a name on its left side (see
EB_CreateStringGadget for more information)
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateRealGadget
NAME
EB_CreateRealGadget creates a longreal gadget
SYNOPSIS
box = EB_CreateRealGadget(con, minChar, digits, id)
D0 A0 D0 D1 D2
EB_GadBoxPtr box;
EB_GadContext con;
WORD minChar, digits;
LONG id;
FUNCTION
Creates an longreal gadget and associated graphics.
INPUTS
con : pointer to gad context
minChar : minimum number of chars to display
digits : number of digits in real number
id : the gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateResponseBox
NAME
EB_CreateResponseBox creates a response box
SYNOPSIS
box = EB_CreateResponseBox(con, response, minWidth, maxWidth,
D0 A0 A1 D0 D1
minHeight, maxHeight)
D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
EB_ResBoxPtr response;
WORD minWidth, maxWidth, minHeight, maxHeight;
FUNCTION
Creates a response box. This box contains a pointer to a structur, in which
the resulting coordinates of this box are written. This type is usefull
for input and output elements, which are not easy to fit in gadgets and
or rendering.
INPUTS
con : pointer to gadcontext
response : pointer to response box. In this box the resulting coordinates are
written.
minWidth,
minHeight : minimum dimensions
maxWidth,
maxHeight : maximum dimensions.
RETURNS
NULL if fails, else pointer to new gadbox
egsgadbox.library/EB_CreateStringGadget
NAME
EB_CreateStringGadget create a string gadget
SYNOPSIS
box = EB_CreateStringGadget(con, minChar, buffLen, justify, id)
D0 A0 D0 D1 D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
WORD minChar, buffLen;
UBYTE justify;
LONG id;
FUNCTION
Creates a string gadget, and associated graphics.
INPUTS
con : pointer to gadget context
minChar : minimal number of characters to be displayed
buffLen : size of buffer
justify : jsutification of string
id : the gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateSuperHorizProp
NAME
EB_CreateSuperHorizProp create prop gadget with arrows
SYNOPSIS
box = EB_CreateSuperHorizProp(con, maximum, size, value, id, flags)
D0 A0 D0 D1 D2 D3 D4
EB_GadBoxPtr box;
EB_GadContext con;
WORD maximum, size, value;
LONG id;
UBYTE flags;
FUNCTION
Creates a proportional gadget with arrows for increasing and decreasing.
The arrows work without additional programming. They may be located on any
side of the gadgets, determined by the contents of flags. (See
EB_CreateHorizProp for further information)
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateSuperVertiProp
NAME
EB_CreateSuperVertiProp create prop gadget with arrows
SYNOPSIS
box = EB_CreateSuperVertiProp(con, maximum, size, value, id, flags)
D0 A0 D0 D1 D2 D3 D4
EB_GadBoxPtr box;
EB_GadContext con;
WORD maximum, size, value;
LONG id;
UBYTE flags;
FUNCTION
Creates a proportional gadget with arrows for increasing and decreasing.
The arrows work without additional programming. They may be located on any
side of the gadgets, determined by the contents of flags. (See
EB_CreateVertiProp for further information)
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateText
NAME
EB_CreateText creates a line of text
SYNOPSIS
box = EB_CreateText(con, str)
D0 A0 A1
EB_GadBoxPtr box;
EB_GadContext con;
char *str;
FUNCTION
Creates one line of text in the contexts font.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateTextAction
NAME
EB_CreateTextAction create action gadget
SYNOPSIS
box = EB_CreateTextAction(con, name, id, fill)
D0 A0 A1 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
char *name;
LONG id;
UBYTE fill;
FUNCTION
Creates an action gadget around a text.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateTextBoolean
NAME
EB_CreateTextBoolean creates boolean gadget
SYNOPSIS
box = EB_CreateTextBoolean(con, name, id, fill)
D0 A0 A1 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
char *name;
LONG id;
UBYTE fill;
FUNCTION
Creates an boolean gadget around a text.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateVertiBox
NAME
EB_CreateVertiBox create vertical box
SYNOPSIS
box = EB_CreateVertiBox(con)
D0 A0
EB_GadBoxPtr box;
EB_GadContext con;
FUNCTION
Creates a box that combines several other boxes vertical. All son boxes
of a vertical box are placed one below the other, and build a column.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateVertiFill
NAME
EB_CreateVertiFill create vertical fill element
SYNOPSIS
box = EB_CreateVertiFill(con, fill, pri)
D0 A0 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
UBYTE fill;
BYTE pri;
FUNCTION
Creates a fill element for vertical boxes. This should be used, to separate
gadgets or gadget groups, or to create paddings betweeen borders.
INPUTS
con : pointer to gadcontext
fill : flag, that determines, if the fill box is allowed to expand if needed
pri : the boxes priority
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateVertiProp
NAME
EB_CreateVertiProp creates a vertical prop gadget
SYNOPSIS
box = EB_CreateVertiProp(con, maximum, size, val, id)
D0 A0 D0 D1 D2 D3
EB_GadBoxPtr box;
EB_GadContext con;
WORD maximum, size, val;
LONG id;
FUNCTION
Creates a vertical proportional gadget, and all needed graphics.
INPUTS
con : pointer to gadcontext
maximum : maximum value of slider
size : size of slider
val : value of slider
id : the gadgets id
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateVertiTable
NAME
EB_CreateVertiTable creates a table
SYNOPSIS
box = EB_CreateVertiTable(con)
D0 A0
EB_GadBoxPtr box;
EB_GadContext con;
FUNCTION
Creates a vertical table, that may contain several horizontal boxes, and
arranges their elements in a table.
INPUTS
RETURNS
NULL if fails, else pointer to new subtree
egsgadbox.library/EB_CreateWindow
NAME
EB_CreateWindow creates a window
SYNOPSIS
box = EB_CreateWindow(con, left, top)
D0 A0 D0 D1
EB_GadBoxPtr box;
EB_GadContext con;
WORD left, top;
FUNCTION
Creates a EI_NewWindow structure, associoated to a gadget box. The window will
open at left/top, and include all gadboxes, which are added to it. Normally
this function is not needed, because it is included in EB_ProcessGadBoxes.
INPUTS
RETURNS
NULL if fails, else pointer to new tree
egsgadbox.library/EB_CWidth
NAME
EB_CWidth evaluate width of character
SYNOPSIS
width = EB_CWidth(char, font)
D0 D2 A1
WORD width;
char char;
EG_EFontPtr font;
FUNCTION
Evaluates the width of one character.
INPUTS
RETURNS
egsgadbox.library/EB_DeleteGadContext
NAME
EB_DeleteGadContext delete a gad context
SYNOPSIS
EB_DeleteGadContext(con)
A0
EB_GadContext con;
FUNCTION
Deletes a gadget context and the two included contexts. All memory which has
been allocated to create the gadgets, and the gadgets self are deallocated.
INPUTS
RETURNS
egsgadbox.library/EB_FindGadget
NAME
EB_FindGadget find a gadget
SYNOPSIS
gad = EB_FindGadget(first, num, id)
D0 A0 D0 D1
EI_GadgetPtr gad;
EI_GadgetPtr first;
WORD num;
LONG id;
FUNCTION
Finds a gadget in a gadgetlist by its id.
INPUTS
first : pointer to first gadget in the list
num : number of gadgets in the list
id : the gadgets id
RETURNS
pointer to the gadget, or NULL if it was not found
egsgadbox.library/EB_FreeMemCon
NAME
EB_FreeMemCon deallocate memory
SYNOPSIS
EB_FreeMemCon(mem)
A0
APTR mem;
FUNCTION
Deallocates memory that was allocated using EB_AllocMemCon.
INPUTS
RETURNS
egsgadbox.library/EB_GetStringData
NAME
EB_GetStringData extract string from gadget buffer
SYNOPSIS
EB_GetStringData(gad, str)
A0 A1
EI_GadgetPtr gad;
char *str;
FUNCTION
Extracts a string from a gadgets string buffer.
INPUTS
RETURNS
egsgadbox.library/EB_LinkStringGadgets
NAME
EB_LinkStringGadgets links two string gadgets
SYNOPSIS
done = EB_LinkStringGadgets(con, from, to)
D0 A0 A1 A2
BOOL done;
EB_GadContext con;
EB_GadBoxPtr from, to;
FUNCTION
Links two string gadgets so that the user can move from one to the other
using TAB and SHIFT+TAB. The routine searches for the next string gadget
in the subtree.
INPUTS
con : pointer to gadget context
from : subtree that contains the first string gadget
to : subtree that contains the second string gadget
RETURNS
FALSE if failed, see error field in context for more information
egsgadbox.library/EB_LinkStringGadgetsID
NAME
EB_LinkStringGadgetsID links two string gadgets
SYNOPSIS
done = EB_LinkStringGadgetsID(con, from, to, first, num)
D0 A0 D0 D1 A1 D2
BOOL done;
EB_GadContext con;
LONG from, to;
EI_GadgetPtr firs;
WORD num;
FUNCTION
Links two string gadgets so that the user can move from one to the other
using TAB and SHIFT+TAB. The routine searches for the gadgets in a
gadget list. If num is -1 the routine takes the list provided by the gadget
context.
INPUTS
con : pointer to gadget context
from, to : the gadgets ids
first : first gadget in the list
num : number of gadgets in the list, or -1
RETURNS
FALSE if failed, see error field in context for more information
egsgadbox.library/EB_MAX
NAME
EB_MAX
SYNOPSIS
max = EB_MAX(a, b)
D0 D0 D1
WORD max, a, b;
FUNCTION
Finds the largest value of a and b
INPUTS
a, b: Numbers to compare
RETURNS
max - the largest number of a and b.
egsgadbox.library/EB_MIN
NAME
EB_MIN
SYNOPSIS
min = EB_MIN(a, b)
D0 D0 D1
WORD min, a, b;
FUNCTION
Finds the smaller of a and b
INPUTS
a, b: numbers to compare
RETURNS
min - the smaller of a and b.
egsgadbox.library/EB_NewFixHeight
NAME
EB_NewFixHeight modify a box to fixed height
SYNOPSIS
new = EB_NewFixHeight(box)
D0 A0
EB_GadBoxPtr new, box;
FUNCTION
Modifies a gadbox so that its maximum height equals its minimum height, which
has the effect, that the gadbox size is locked to its minimum.
INPUTS
box : pointer to gadbox
RETURNS
the same pointer as box
egsgadbox.library/EB_NewFixWidth
NAME
EB_NewFixWidth modify a box to fixed width
SYNOPSIS
new = EB_NewFixWidth(box)
D0 A0
EB_GadBoxPtr new, box;
FUNCTION
Modifies a gadbox so that its maximum width equals its minimum width, which
has the effect, that the gadbox size is locked to its minimum.
INPUTS
box : pointer to gadbox
width : the new height of the box
RETURNS
the same pointer as box
egsgadbox.library/EB_NewMaxHeight
NAME
EB_NewMaxHeight modifies a box maximum height
SYNOPSIS
new = EB_NewMaxHeight(box, height)
D0 A0 D0
EB_GadBoxPtr new, box;
WORD height;
FUNCTION
Modifies the maximum height of a gadbox
INPUTS
box : pointer to gadbox
height : the new height of the box
RETURNS
the same pointer as box
egsgadbox.library/EB_NewMaxWidth
NAME
EB_NewMaxWidth modifies a box maximum width
SYNOPSIS
new = EB_NewMaxWidth(box, width)
D0 A0 D0
EB_GadBoxPtr new, box;
WORD width;
FUNCTION
Modifies the maximum width of a gadbox
INPUTS
box : pointer to gadbox
RETURNS
the same pointer as box
egsgadbox.library/EB_NewMinHeight
NAME
EB_NewMinHeight modifies a box minimum height
SYNOPSIS
new = EB_NewMinHeight(box, height)
D0 A0 D0
EB_GadBoxPtr new, box;
WORD height;
FUNCTION
Modifies the minimum height of a gadbox
INPUTS
box : pointer to gadbox
RETURNS
the same pointer as box
egsgadbox.library/EB_NewMinWidth
NAME
EB_NewMinWidth modifies a box minimum width
SYNOPSIS
new = EB_NewMinWidth(box, width)
D0 A0 D0
EB_GadBoxPtr new, box;
WORD width;
FUNCTION
Modifies the minimum width of a gadbox
INPUTS
box : pointer to gadbox
RETURNS
the same pointer as box
egsgadbox.library/EB_NewPri
NAME
EB_NewPri modifies a boxes priority
SYNOPSIS
new = EB_NewPri(box, pri)
D0 A0 D0
EB_GadBoxPtr new, box;
BYTE pri;
FUNCTION
Modifies the priority of a box.
INPUTS
box : pointer to gadbox
pri : new priority
RETURNS
the same pointer as box
egsgadbox.library/EB_NewSameSize
NAME
EB_NewSameSize changes all boxes in list to be same size
SYNOPSIS
new = EB_NewSameSize(box)
D0 A0
EB_GadBoxPtr new, box;
FUNCTION
Distributes the running length (width for horizontal boxes,
height for vertical boxes) evenly to the boxes in
INPUTS
box : pointer to gadbox
RETURNS
the same pointer as box
egsgadbox.library/EB_ProcessGadBoxes
NAME
EB_ProcessGadBoxes make a window out of a gad box tree
SYNOPSIS
done = EB_ProcessGadBoxes(con, root)
D0 A0 A1
BOOL done;
EB_GadContext con;
EB_GadBoxPtr root;
FUNCTION
Builds up a new window structure and a list of gadgets out of a gad box tree.
Calls EB_CreateWindow, CalcMinMax, CalcRealSize, CalcPositions,
CalcGadgetGfx, ConnectGadgets and deletes the tempororay context. The tree
is deleted by this operation. If it succeeds, you can open a window, using
the EI_NewWindow pointer in the EB_GadContext, and get all rendering and
gadgets displayed and ready to use. You may modify the windows flags, but
you should not modify its size.
INPUTS
con : pointer to gadget context
root : pointer to root of gadbox tree (is disposed during operation)
RETURNS
FALSE if fails, see error field in gadget context for more information
egsgadbox.library/EB_ProcessGadBoxesSize
NAME
EB_ProcessGadBoxesSize fits gadboxes into boxes
SYNOPSIS
done = EB_ProcessGadBoxesSize(con, root, width, height)
D0 A0 A1 D0 D1
BOOL done;
EB_GadContext con;
EB_GadBoxPtr root;
WORD width, height;
FUNCTION
Builds up a new window structure and a list of gadgets out of a gad box
tree, very much like EB_ProcessGadBoxes with the difference that
the tree is attempted to be fitted into an area of width,height.
INPUTS
con : pointer to gadget context
root : pointer to root of gadbox tree (is disposed during operation)
width : desired minimum width
height : desired minimum height
RETURNS
FALSE if fails, see error field in gadget context for more information
egsgadbox.library/EB_PutIntData
NAME
EB_PutIntData put integer value into gadget
SYNOPSIS
EB_PutIntData(win, gad, val)
A0 A1 D0
EI_WindowPtr win;
EI_GadgetPtr gad;
LONG val;
FUNCTION
Puts an integer value in an integer gadget, and refreshes it, if the window
is allready open.
INPUTS
win : pointer to the gadgets window or NULL, for no refresh
gad : pointer to integer gadget
val : value for gadget
RETURNS
egsgadbox.library/EB_PutRealData
NAME
EB_PutRealData
SYNOPSIS
EB_PutRealData(win,gad,val,field,digits,exp)(A0/A1/D0/D2/D3/D4)
FUNCTION
INPUTS
RETURNS
egsgadbox.library/EB_PutStringData
NAME
EB_PutStringData puts string in gadget
SYNOPSIS
EB_PutStringData(win, gad, str)
A0 A1 A2
EI_WindowPtr win;
EI_GadgetPtr gad;
char *str;
FUNCTION
Puts a string in a string gadget and refreshes it if the window is allready
open.
INPUTS
win : pointer to the gadgets window or NULL, for no refresh
gad : pointer to integer gadget
str : string for gadget
RETURNS
egsgadbox.library/EB_SMatch
NAME
EB_SMatch number of chars that match in field
SYNOPSIS
len = EB_SMatch(str, font, width)
D0 A0 A1 D2
WORD len;
char *str;
EG_EFontPtr font;
WORD width;
FUNCTION
Evaluates how many characters of a given string match into a text field.
INPUTS
str : pointer to string
font : font for which to evaluate
width : width of the field
RETURNS
number of chars that match into the field, if all characters match, returns
the strings length.
egsgadbox.library/EB_SWidth
NAME
EB_SWidth evaluate width of string
SYNOPSIS
width = EB_SWidth(str, font)
D0 A0 A1
WORD width;
char *str;
EG_EFontPtr font;
FUNCTION
Evaluates how width a string would be in a given font.
INPUTS
str : pointer to string
font : pointer to font
RETURNS
width in pixel
egsgadbox.library/EB_WriteInfoBox
NAME
EB_WriteInfoBox write text in info box
SYNOPSIS
EB_WriteInfoBox(info, win, str)
A0 A1 A2
EB_InfoBoxPtr info;
EI_WindowPtr win;
char *str;
FUNCTION
Writes a text into an info box (see EB_CreateInfoBox), if the string does
not fit into the box, it is truncated.
INPUTS
info : pointer to info box, initialized by EB_CreateInfoBox
win : pointer to window
str : pointer to string
RETURNS
egsgadbox.library/EB_WriteInfoBoxInt
NAME
EB_WriteInfoBoxInt write number into info box
SYNOPSIS
EB_WriteInfoBoxInt(info, win, val)
A0 A1 D0
EB_InfoBoxPtr info;
EI_WindowPtr win;
LONG val;
FUNCTION
Writes a number into an info box (see EB_CreateInfoBox), if the number does
not fit into the box, it is truncated.
INPUTS
info : pointer to info box, initialized by EB_CreateInfoBox
win : pointer to window
val : number
RETURNS